package interview;

public class interview_01_02 {
    public boolean CheckPermutation(String s1, String s2) {
        int len1=s1.length();
        int len2=s2.length();
        if(len1!=len2) return false;
        int[] num=new int[128];
        for(int i=0;i<len1;++i){
            num[s1.charAt(i)]+=1;
            num[s2.charAt(i)]-=1;
        }
        for(int i=0;i<128;++i){
            if(num[i]!=0) return false;
        }
        return true;
    }
}
